VT-d: clean up map/unmap log messages
authorJan Beulich <jbeulich@suse.com>
Thu, 22 Nov 2012 08:59:50 +0000 (09:59 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 22 Nov 2012 08:59:50 +0000 (09:59 +0100)
- printing file name and line number here is pointless
- they are guest related, so should get their log level filter
  accordingly
- include segment numbers and canonicalize number widths

Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/passthrough/vtd/iommu.c

index ee21ef783c4392388b1e0f1933240df300851151..86d1ebf0fca0c277dcabbff70d35f7edad33ebae 100644 (file)
@@ -1289,11 +1289,11 @@ int domain_context_mapping_one(
         {
             if ( pdev->domain != domain )
             {
-                dprintk(XENLOG_INFO VTDPREFIX, "d%d: bdf = %x:%x.%x owned by d%d!",
-                        domain->domain_id, 
-                        bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
-                        (pdev->domain)
-                        ? pdev->domain->domain_id : -1);
+                printk(XENLOG_G_INFO VTDPREFIX
+                       "d%d: %04x:%02x:%02x.%u owned by d%d!",
+                       domain->domain_id,
+                       seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
+                       pdev->domain ? pdev->domain->domain_id : -1);
                 res = -EINVAL;
             }
         }
@@ -1304,17 +1304,19 @@ int domain_context_mapping_one(
             
             if ( cdomain < 0 )
             {
-                dprintk(VTDPREFIX, "d%d: bdf = %x:%x.%x mapped, but can't find owner!\n",
-                        domain->domain_id, 
-                        bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
+                printk(XENLOG_G_WARNING VTDPREFIX
+                       "d%d: %04x:%02x:%02x.%u mapped, but can't find owner!\n",
+                       domain->domain_id,
+                       seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
                 res = -EINVAL;
             }
             else if ( cdomain != domain->domain_id )
             {
-                dprintk(XENLOG_INFO VTDPREFIX, "d%d: bdf = %x:%x.%x already mapped to d%d!",
-                        domain->domain_id, 
-                        bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
-                        cdomain);
+                printk(XENLOG_G_INFO VTDPREFIX
+                       "d%d: %04x:%02x:%02x.%u already mapped to d%d!",
+                       domain->domain_id,
+                       seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
+                       cdomain);
                 res = -EINVAL;
             }
         }